package com.appspot.task2dolist;
import java.io.IOException;
import javax.servlet.http.*;
import com.google.appengine.api.users.*;

@SuppressWarnings("serial")
public class task2dolistServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
		UserService us = UserServiceFactory.getUserService();
		User user = us.getCurrentUser();
		if(user==null){
			resp.sendRedirect(us.createLoginURL(req.getRequestURI()));
		}
		else{
			resp.setContentType("text/plain");
			resp.getWriter().print("welcome"+user.getNickname());
		}
		
		
	}
}
